﻿using System;
using System.ComponentModel.DataAnnotations;

namespace IntellectShop.Common
{
	public partial class Certification : Commodity
	{
		[ScaffoldColumn(false)]
		public int CertificationID { get; set; }

		[DisplayNameLocalized("Category")]
		[Required(ErrorMessage = "Certification category is required")]
		public Common.Category Category { get; set; }

		public int CategoryID
		{
			get { return this.Category.CategoryID; }
			set { this.Category.CategoryID = value; }
		}

		[ScaffoldColumn(false)]
		public override CommodityType CommodityType
		{
			get
			{
				return Common.CommodityType.Certification;
			}
		}

		public Certification()
		{
			this.Category = new Common.Category();
		}

		public override string ToString()
		{
			return String.Format("{0}", this.Name);
		}
	}
}
